#A大厅
execute as @s[tag=xiao,tag=PERxiao] run scoreboard players set @s SystemJoin 2
execute as @s[tag=xiao,tag=!PERxiao,scores={SystemJoin=1,DataHeroCard=5..}] run scoreboard players set @s SystemJoin 0
tag @s[tag=xiao,scores={SystemJoin=0}] add PERxiao

execute as @s[tag=zzsn,tag=PERzzsn] run scoreboard players set @s SystemJoin 2
execute as @s[tag=zzsn,tag=!PERzzsn,scores={SystemJoin=1,DataHeroCard=5..}] run scoreboard players set @s SystemJoin 0
tag @s[tag=zzsn,scores={SystemJoin=0}] add PERzzsn

execute as @s[tag=shinai,tag=PERshinai] run scoreboard players set @s SystemJoin 2
execute as @s[tag=shinai,tag=!PERshinai,scores={SystemJoin=1,DataHeroCard=5..}] run scoreboard players set @s SystemJoin 0
tag @s[tag=shinai,scores={SystemJoin=0}] add PERshinai

execute as @s[tag=laiwei,tag=PERlaiwei] run scoreboard players set @s SystemJoin 2
execute as @s[tag=laiwei,tag=!PERlaiwei,scores={SystemJoin=1,DataHeroCard=5..}] run scoreboard players set @s SystemJoin 0
tag @s[tag=laiwei,scores={SystemJoin=0}] add PERlaiwei

execute as @s[tag=haidao,tag=PERhaidao] run scoreboard players set @s SystemJoin 2
execute as @s[tag=haidao,tag=!PERhaidao,scores={SystemJoin=1,DataHeroCard=5..}] run scoreboard players set @s SystemJoin 0
tag @s[tag=haidao,scores={SystemJoin=0}] add PERhaidao

execute as @s[tag=yasuo,tag=PERyasuo] run scoreboard players set @s SystemJoin 2
execute as @s[tag=yasuo,tag=!PERyasuo,scores={SystemJoin=1,DataHeroCard=5..}] run scoreboard players set @s SystemJoin 0
tag @s[tag=yasuo,scores={SystemJoin=0}] add PERyasuo

execute as @s[tag=waerte,tag=PERwaerte] run scoreboard players set @s SystemJoin 2
execute as @s[tag=waerte,tag=!PERwaerte,scores={SystemJoin=1,DataHeroCard=5..}] run scoreboard players set @s SystemJoin 0
tag @s[tag=waerte,scores={SystemJoin=0}] add PERwaerte

execute as @s[tag=aijisi,tag=PERaijisi] run scoreboard players set @s SystemJoin 2
execute as @s[tag=aijisi,tag=!PERaijisi,scores={SystemJoin=1,DataHeroCard=5..}] run scoreboard players set @s SystemJoin 0
tag @s[tag=aijisi,scores={SystemJoin=0}] add PERaijisi

execute as @s[tag=xueya,tag=PERxueya] run scoreboard players set @s SystemJoin 2
execute as @s[tag=xueya,tag=!PERxueya,scores={SystemJoin=1,DataHeroCard=5..}] run scoreboard players set @s SystemJoin 0
tag @s[tag=xueya,scores={SystemJoin=0}] add PERxueya

execute as @s[tag=weide,tag=PERweide] run scoreboard players set @s SystemJoin 2
execute as @s[tag=weide,tag=!PERweide,scores={SystemJoin=1,DataHeroCard=5..}] run scoreboard players set @s SystemJoin 0
tag @s[tag=weide,scores={SystemJoin=0}] add PERweide


#B大厅
execute as @s[tag=panshi,tag=PERpanshi] run scoreboard players set @s SystemJoin 2
execute as @s[tag=panshi,tag=!PERpanshi,scores={SystemJoin=1,DataHeroCard=5..}] run scoreboard players set @s SystemJoin 0
tag @s[tag=panshi,scores={SystemJoin=0}] add PERpanshi

execute as @s[tag=mieshang,tag=PERmieshang] run scoreboard players set @s SystemJoin 2
execute as @s[tag=mieshang,tag=!PERmieshang,scores={SystemJoin=1,DataHeroCard=5..}] run scoreboard players set @s SystemJoin 0
tag @s[tag=mieshang,scores={SystemJoin=0}] add PERmieshang

execute as @s[tag=zuoxu,tag=PERzuoxu] run scoreboard players set @s SystemJoin 2
execute as @s[tag=zuoxu,tag=!PERzuoxu,scores={SystemJoin=1,DataHeroCard=5..}] run scoreboard players set @s SystemJoin 0
tag @s[tag=zuoxu,scores={SystemJoin=0}] add PERzuoxu

execute as @s[tag=yifuer,tag=PERyifuer] run scoreboard players set @s SystemJoin 2
execute as @s[tag=yifuer,tag=!PERyifuer,scores={SystemJoin=1,DataHeroCard=5..}] run scoreboard players set @s SystemJoin 0
tag @s[tag=yifuer,scores={SystemJoin=0}] add PERyifuer


execute as @s[tag=yao,tag=PERyao] run scoreboard players set @s SystemJoin 2
execute as @s[tag=yao,tag=!PERyao,scores={SystemJoin=1,DataHeroCard=5..}] run scoreboard players set @s SystemJoin 0
tag @s[tag=yao,scores={SystemJoin=0}] add PERyao

execute as @s[tag=meiqin,tag=PERmeiqin] run scoreboard players set @s SystemJoin 2
execute as @s[tag=meiqin,tag=!PERmeiqin,scores={SystemJoin=1,DataHeroCard=5..}] run scoreboard players set @s SystemJoin 0
tag @s[tag=meiqin,scores={SystemJoin=0}] add PERmeiqin


execute as @s[tag=qiaoyisi,tag=PERqiaoyisi] run scoreboard players set @s SystemJoin 2
execute as @s[tag=qiaoyisi,tag=!PERqiaoyisi,scores={SystemJoin=1,DataHeroCard=5..}] run scoreboard players set @s SystemJoin 0
tag @s[tag=qiaoyisi,scores={SystemJoin=0}] add PERqiaoyisi

# execute as @s[tag=mingge,tag=PERmingge] run scoreboard players set @s SystemJoin 2
# execute as @s[tag=mingge,tag=!PERmingge,scores={SystemJoin=1,DataHeroCard=5..}] run scoreboard players set @s SystemJoin 0
# tag @s[tag=mingge,scores={SystemJoin=0}] add PERmingge


execute as @s[tag=shanling,tag=PERshanling] run scoreboard players set @s SystemJoin 2
execute as @s[tag=shanling,tag=!PERshanling,scores={SystemJoin=1,DataHeroCard=5..}] run scoreboard players set @s SystemJoin 0
tag @s[tag=shanling,scores={SystemJoin=0}] add PERshanling

execute as @s[tag=mengyan,tag=PERmengyan] run scoreboard players set @s SystemJoin 2
execute as @s[tag=mengyan,tag=!PERmengyan,scores={SystemJoin=1,DataHeroCard=5..}] run scoreboard players set @s SystemJoin 0
tag @s[tag=mengyan,scores={SystemJoin=0}] add PERmengyan


#C大厅
# execute as @s[tag=xiu,tag=PERxiu] run scoreboard players set @s SystemJoin 2
# execute as @s[tag=xiu,tag=!PERxiu,scores={SystemJoin=1,DataHeroCard=5..}] run scoreboard players set @s SystemJoin 0
# tag @s[tag=xiu,scores={SystemJoin=0}] add PERxiu
execute as @s[tag=erhan,tag=PERerhan] run scoreboard players set @s SystemJoin 2
execute as @s[tag=erhan,tag=!PERerhan,scores={SystemJoin=1,DataHeroCard=5..}] run scoreboard players set @s SystemJoin 0
tag @s[tag=erhan,scores={SystemJoin=0}] add PERerhan

execute as @s[tag=wofu,tag=PERwofu] run scoreboard players set @s SystemJoin 2
execute as @s[tag=wofu,tag=!PERwofu,scores={SystemJoin=1,DataHeroCard=5..}] run scoreboard players set @s SystemJoin 0
tag @s[tag=wofu,scores={SystemJoin=0}] add PERwofu

execute as @s[tag=daoshaolin,tag=PERdaoshaolin] run scoreboard players set @s SystemJoin 2
execute as @s[tag=daoshaolin,tag=!PERdaoshaolin,scores={SystemJoin=1,DataHeroCard=5..}] run scoreboard players set @s SystemJoin 0
tag @s[tag=daoshaolin,scores={SystemJoin=0}] add PERdaoshaolin

execute as @s[tag=jueling,tag=PERjueling] run scoreboard players set @s SystemJoin 2
execute as @s[tag=jueling,tag=!PERjueling,scores={SystemJoin=1,DataHeroCard=5..}] run scoreboard players set @s SystemJoin 0
tag @s[tag=jueling,scores={SystemJoin=0}] add PERjueling

execute as @s[tag=akeer,tag=PERakeer] run scoreboard players set @s SystemJoin 2
execute as @s[tag=akeer,tag=!PERakeer,scores={SystemJoin=1,DataHeroCard=5..}] run scoreboard players set @s SystemJoin 0
tag @s[tag=akeer,scores={SystemJoin=0}] add PERakeer

execute as @s[tag=huihui,tag=PERhuihui] run scoreboard players set @s SystemJoin 2
execute as @s[tag=huihui,tag=!PERhuihui,scores={SystemJoin=1,DataHeroCard=5..}] run scoreboard players set @s SystemJoin 0
tag @s[tag=huihui,scores={SystemJoin=0}] add PERhuihui

execute as @s[tag=xingchen,tag=PERxingchen] run scoreboard players set @s SystemJoin 2
execute as @s[tag=xingchen,tag=!PERxingchen,scores={SystemJoin=1,DataHeroCard=5..}] run scoreboard players set @s SystemJoin 0
tag @s[tag=xingchen,scores={SystemJoin=0}] add PERxingchen

execute as @s[tag=weiersen,tag=PERweiersen] run scoreboard players set @s SystemJoin 2
execute as @s[tag=weiersen,tag=!PERweiersen,scores={SystemJoin=1,DataHeroCard=5..}] run scoreboard players set @s SystemJoin 0
tag @s[tag=weiersen,scores={SystemJoin=0}] add PERweiersen


execute as @s[tag=lieshou,tag=PERlieshou] run scoreboard players set @s SystemJoin 2
execute as @s[tag=lieshou,tag=!PERlieshou,scores={SystemJoin=1,DataHeroCard=5..}] run scoreboard players set @s SystemJoin 0
tag @s[tag=lieshou,scores={SystemJoin=0}] add PERlieshou

execute as @s[tag=qishi,tag=PERqishi] run scoreboard players set @s SystemJoin 2
execute as @s[tag=qishi,tag=!PERqishi,scores={SystemJoin=1,DataHeroCard=5..}] run scoreboard players set @s SystemJoin 0
tag @s[tag=qishi,scores={SystemJoin=0}] add PERqishi

execute as @s[tag=miyan,tag=PERmiyan] run scoreboard players set @s SystemJoin 2
execute as @s[tag=miyan,tag=!PERmiyan,scores={SystemJoin=1,DataHeroCard=5..}] run scoreboard players set @s SystemJoin 0
tag @s[tag=miyan,scores={SystemJoin=0}] add PERmiyan


#D大厅
execute as @s[tag=xingyue,tag=PERxingyue] run scoreboard players set @s SystemJoin 2
execute as @s[tag=xingyue,tag=!PERxingyue,scores={SystemJoin=1,DataHeroCard=5..}] run scoreboard players set @s SystemJoin 0
tag @s[tag=xingyue,scores={SystemJoin=0}] add PERxingyue

# execute as @s[tag=yanyu,tag=PERyanyu] run scoreboard players set @s SystemJoin 2
# execute as @s[tag=yanyu,tag=!PERyanyu,scores={SystemJoin=1,DataHeroCard=5..}] run scoreboard players set @s SystemJoin 0
# tag @s[tag=yanyu,scores={SystemJoin=0}] add PERyanyu

# execute as @s[tag=elas,tag=PERelas] run scoreboard players set @s SystemJoin 2
# execute as @s[tag=elas,tag=!PERelas,scores={SystemJoin=1,DataHeroCard=5..}] run scoreboard players set @s SystemJoin 0
# tag @s[tag=elas,scores={SystemJoin=0}] add PERelas

# execute as @s[tag=yelan,tag=PERyelan] run scoreboard players set @s SystemJoin 2
# execute as @s[tag=yelan,tag=!PERyelan,scores={SystemJoin=1,DataHeroCard=5..}] run scoreboard players set @s SystemJoin 0
# tag @s[tag=yelan,scores={SystemJoin=0}] add PERyelan

# execute as @s[tag=nici,tag=PERnici] run scoreboard players set @s SystemJoin 2
# execute as @s[tag=nici,tag=!PERnici,scores={SystemJoin=1,DataHeroCard=5..}] run scoreboard players set @s SystemJoin 0
# tag @s[tag=nici,scores={SystemJoin=0}] add PERnici


##TODO：以上数据复制更改即可————————————————————————————————————————————————————————————————————

scoreboard players remove @s[scores={SystemJoin=0}] DataHeroCard 5
execute as @s[scores={SystemJoin=1}] run tellraw @s [{"text":"英雄卡","color":"dark_purple","bold":false,"italic":false,"underlined":false,"strikethrough":false,"obfuscated":false},{"text":"不足","color":"white","bold":false,"italic":false,"underlined":false,"strikethrough":false,"obfuscated":false},{"text":"剩余","color":"dark_purple","bold":false,"italic":false,"underlined":false,"strikethrough":false,"obfuscated":false},{"score":{"objective":"DataHeroCard","name":"@s"},"color":"dark_purple","bold":false,"italic":false,"underlined":false,"strikethrough":false,"obfuscated":false},{"text":" 已为您自动加入观战","color":"white","bold":false,"italic":false,"underlined":false,"strikethrough":false,"obfuscated":false}]
execute as @s[scores={SystemJoin=0}] run tellraw @a [{"text":"玩家 ","color":"white","bold":false,"italic":false,"underlined":false,"strikethrough":false,"obfuscated":false},{"selector":"@s","color":"green","bold":false,"italic":false,"underlined":false,"strikethrough":false,"obfuscated":false},{"text":" 成功花费","color":"white","bold":false,"italic":false,"underlined":false,"strikethrough":false,"obfuscated":false},{"text":"5英雄卡","color":"dark_purple","bold":false,"italic":false,"underlined":false,"strikethrough":false,"obfuscated":false},{"text":"购买了一个","color":"white","bold":false,"italic":false,"underlined":false,"strikethrough":false,"obfuscated":false},{"text":"永久英雄","color":"gold","bold":false,"italic":false,"underlined":false,"strikethrough":false,"obfuscated":false}]
#,{"text":"剩余","color":"dark_purple","bold":false,"italic":false,"underlined":false,"strikethrough":false,"obfuscated":false},{"score":{"objective":"DataHeroCard","name":"@s"},"color":"dark_purple","bold":false,"italic":false,"underlined":false,"strikethrough":false,"obfuscated":false},{"text":" 已为您自动加入观战","color":"white","bold":false,"italic":false,"underlined":false,"strikethrough":false,"obfuscated":false}]
execute as @s[scores={SystemJoin=2}] run tellraw @s [{"text":"您已拥有此英雄，无需重复购买","color":"white","bold":false,"italic":false,"underlined":false,"strikethrough":false,"obfuscated":false}]
tag @s add Alive
scoreboard players set @s SystemDeath 2
spreadplayers ~ ~ 2 1 false @s
tag @s remove BuyHero
